# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tlshelpers
pkgver=37.9908fd7
pkgrel=1
pkgdesc='A collection of shell scripts that help handling X.509 certificate and TLS issues.'
arch=('any')
groups=('blackarch' 'blackarch-crypto')
url='https://github.com/hannob/tlshelpers'
license=('Unlicense')
depends=('der-ascii' 'openssl' 'wget')
makedepends=('git')
source=("git+https://github.com/hannob/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md

  install -Dm 755 -t "$pkgdir/usr/bin/" create-csr fakekey getsubdomain \
    matchcertkey ocspverify
}

